
/*
 * meomis的公共js定义
 *
 *  
 */
var commons = {
	//项目名称，WAR包名称
	webserversite : '/Project',
	
	//dataTable序号列的位置
	xhId : 0
};


/*
 * 初始化dataTable控件
 * 
 */
var datatable = {
					"bJQueryUI": true,
					"sPaginationType": "full_numbers",
//					"sDom": 'T<"clear"><"H"f><"clear">rt<"F"lip><"clear">',
					"sDom": '<"H"Tfr>t<"F"lip>',
					"bStateSave": true,
					"oLanguage": {
						"sUrl": commons.webserversite+"/assets/common/zh_cn.txt"
			 		},
			 		"bInfo": true,
			 		"bDestroy": true,
			 		"iDisplayStart": 20,
			 		"aoColumns": [
//			 		             { "sClass": "center", "bSortable": false },
//			 		             { "bSortable": false, "aTargets": [ 1 ] },
//			 		             null,
//			 		             null,
//			 		             {"bSortable": false },
//			 		             {"bSortable": false }
			 		],
			 		"aaSorting": [[1, 'asc']],
			 		"bFiltered":false,
					"bProcessing": true,
//					"iDeferLoading": [ 1, 20 ],					
//					"iDisplayLength": 50,
					"oTableTools": {
						"aButtons": [

						]
					},
					"fnDrawCallback": function ( oSettings ) {
						/* 设置默认序号列 */
						if ( oSettings.bSorted || oSettings.bFiltered )
						{
							for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
							{
								$('td:eq('+commons.xhId+')', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
							}
						}
					}
	//				"bRetrieve": true
	//				"sAjaxSource": "../../js/pages/systems.txt"
	};
			
var datatableOnServer = {
		"bJQueryUI": true,
		"sPaginationType": "full_numbers",
		"sDom": '<"H"Tfr>t<"F"lip>',
		"bStateSave": true,
		"oLanguage": {
			"sUrl": commons.webserversite+"/assets/common/zh_cn.txt"
 		},
 		"bInfo": true,
 		"bDestroy": true,
 		"aoColumns": [],
 		"aaSorting": [[1, 'asc']],
		"bProcessing": true,
		"bFiltered":false,
		"oTableTools": {
			"aButtons": []
		},
		//set tr class
		"asStripeClasses": [ 'gradeA odd', 'gradeA even' ],
		"sAjaxDataProp" : '',
		"bServerSide": true,    //指定从服务器端获取数据  
		"fnServerData": "",     //获取数据的处理函数  
		"sAjaxSource": ""		//获取数据的url  
};